﻿/**
 *
 * @file OperLoads.h
 * @brief  载荷表格操作器
 * @author wangning (2185896382@qq.com)
 * @date 2024-12-26
 *
 */
#ifndef __OPER_LoadsAll_H___
#define __OPER_LoadsAll_H___

#include "OperatorsInterface/OperAbstractLoad.h"

namespace ModelOper
{
    /**
     * @brief 载荷表格操作器
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-23
     */
    class OperLoads : public EventOper::OperAbstractLoad
    {
    public:
        explicit OperLoads() = default;
        virtual ~OperLoads() = default;
        /**
         * @brief 执行UI操作
         * @return true
         * @return false
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        bool execGUI() override;
        /**
         * @brief 执行业务操作
         * @return true
         * @return false
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        bool execProfession() override;
        /**
          * @brief 编辑载荷
          * @param[i]  loadID            载荷对象id
          * @author wangning (2185896382@qq.com)
          * @date 2024-12-10
          */
        virtual void editLoad(const int loadID) override;
        /**
         * @brief 删除载荷
         * @param[i]  loadID          载荷对象id
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        virtual void removeLoad(const int loadID) override;
        /**
         * @brief 批量设置属性
         * @param[i]  name           属性名
         * @param[i]  currentText    当前值
         * @param[i]  attrIndex      属性索引
         * @param[i]  loadID        载荷对象id
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void setAttribute(const QString &name, const QString& currentText, const int attrIndex, const QList<int> & loadIDs) override;
   
    private:
        /**
        * @brief 批量设置PointForcesMoments属性
        * @param[i]  name           属性名
        * @param[i]  currentText    当前值
        * @param[i]  attrIndex      属性索引
        * @param[i]  loadID        载荷对象id
        * @author wangning (2185896382@qq.com)
        * @date 2024-01-23
        */
        void setAttributePointForcesMoments(const QString &name, const QString& currentText, const int attrIndex, const QList<int> & loadIDs);
        /**
         * @brief 批量设置ConstraintAcoustic属性
         * @param[i]  name           属性名
         * @param[i]  currentText    当前值
         * @param[i]  attrIndex      属性索引
         * @param[i]  loadID        载荷对象id
         * @author wangning (2185896382@qq.com)
         * @date 2024-01-23
         */
        void setAttributeConstraintAcoustic(const QString &name, const QString& currentText, const int attrIndex, const QList<int> & loadIDs);
        /**
         * @brief 批量设置ConstraintBeam属性
         * @param[i]  name           属性名
         * @param[i]  currentText    当前值
         * @param[i]  attrIndex      属性索引
         * @param[i]  loadID        载荷对象id
         * @author wangning (2185896382@qq.com)
         * @date 2024-01-23
         */
        void setAttributeConstraintBeam(const QString &name, const QString& currentText, const int attrIndex, const QList<int> & loadIDs);
        /**
         * @brief 批量设置ConstraintShell属性
         * @param[i]  name           属性名
         * @param[i]  currentText    当前值
         * @param[i]  attrIndex      属性索引
         * @param[i]  loadID        载荷对象id
         * @author wangning (2185896382@qq.com)
         * @date 2024-01-23
         */
        void setAttributeConstraintShell(const QString &name, const QString& currentText, const int attrIndex, const QList<int> & loadIDs);
        /**
         * @brief 批量设置PowerAcoustic属性
         * @param[i]  name           属性名
         * @param[i]  currentText    当前值
         * @param[i]  attrIndex      属性索引
         * @param[i]  loadID        载荷对象id
         * @author wangning (2185896382@qq.com)
         * @date 2024-01-23
         */
        void setAttributePowerAcoustic(const QString &name, const QString& currentText, const int attrIndex, const QList<int> & loadIDs);
        /**
         * @brief 批量设置PowerBeam属性
         * @param[i]  name           属性名
         * @param[i]  currentText    当前值
         * @param[i]  attrIndex      属性索引
         * @param[i]  loadID        载荷对象id
         * @author wangning (2185896382@qq.com)
         * @date 2024-01-23
         */
        void setAttributePowerBeam(const QString &name, const QString& currentText, const int attrIndex, const QList<int> & loadIDs);
        /**
         * @brief 批量设置PowerShell属性
         * @param[i]  name           属性名
         * @param[i]  currentText    当前值
         * @param[i]  attrIndex      属性索引
         * @param[i]  loadID        载荷对象id
         * @author wangning (2185896382@qq.com)
         * @date 2024-01-23
         */
        void setAttributePowerShell(const QString &name, const QString& currentText, const int attrIndex, const QList<int> & loadIDs);
        /**
         * @brief 批量设置Monopole属性
         * @param[i]  name           属性名
         * @param[i]  currentText    当前值
         * @param[i]  attrIndex      属性索引
         * @param[i]  loadID        载荷对象id
         * @author wangning (2185896382@qq.com)
         * @date 2024-01-23
         */
        void setAttributeMonopole(const QString &name, const QString& currentText, const int attrIndex, const QList<int> & loadIDs);
    };
    //注册对象
    Register2FITKOperatorRepo(OperLoadPointForcesMoments, OperLoads);
    Register2FITKOperatorRepo(OperLoadHVACNoise, OperLoads);
    Register2FITKOperatorRepo(OperLoadConstraintAcoustic, OperLoads);
    Register2FITKOperatorRepo(OperLoadConstraintBeam, OperLoads);
    Register2FITKOperatorRepo(OperLoadConstraintShell, OperLoads);
    Register2FITKOperatorRepo(OperLoadPowerAcoustic, OperLoads);
    Register2FITKOperatorRepo(OperLoadPowerBeam, OperLoads);
    Register2FITKOperatorRepo(OperLoadPowerShell, OperLoads);
    Register2FITKOperatorRepo(OperLoadMonopole, OperLoads);

}

#endif